package com.itcam.phaseii.bignum;

import java.math.BigInteger;

public class BigInteger_ {
    public static void main(String[] args) {
        // 当我们编程中，需要处理很大的整数，long不够用
        // 可以使用BigInteger的类来搞定

        BigInteger bigInteger1 = new BigInteger("2378888999999999999999999999999");
        BigInteger bigInteger2 = new BigInteger("1111111111111111111111111111111");

        // add 加
        System.out.println(bigInteger1.add(bigInteger2));

        // subtract 减
        System.out.println(bigInteger1.subtract(bigInteger2));

        // multiply 乘
        System.out.println(bigInteger1.multiply(bigInteger2));

        // divide 除
        System.out.println(bigInteger1.divide(bigInteger2));


    }
}
